package com.xw.unification.test.enums;

import com.xw.unification.interfaces.ResultCodeEnumerable;
import lombok.Getter;

@Getter
public enum ResultCode implements ResultCodeEnumerable {
    /**
     * 成功 - 100000
     */
    SUCCESS(100000, "请求成功"),
    ERROR(900000, "请求失败"),
    BAD_REQUEST_URL(900001, "不存在的请求路径"),
    INVALID_SIGNATURE(900010, "签名验证失败"),
    ;

    private final int code;
    private final String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    ResultCode(int code) {
        this.code = code;
        this.message = null;
    }

}
